Ext.define('BM.view.main.TokenBrowser' ,{
    extend: 'Ext.view.View',
    alias: 'widget.tokenbrowser',
    uses: 'Ext.data.Store',
    store: 'Tokens',
	singleSelect: true,
    overItemCls: 'x-view-over',
    itemSelector: 'div.thumb-wrap',
    tpl: [
            '<tpl for=".">',
                '<div class="thumb-wrap">',
                    '<div class="thumb">',
                    (!Ext.isIE6? '<img src="ext/resources/images/token/{typeFlag}-{handStatus_FK}.png" />' : 
                    '<div style="width:74px;height:74px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'ext/resources/images/token/{typeFlag}-{handStatus_FK}.png\')"></div>'),
                    '</div>',
                    '<span>{handTokenNum}</span>',
                '</div>',
            '</tpl>'
    ],
    
    initComponent: function() {
         
        this.callParent(arguments);
        this.store.sort();
        this.store.filter('typeFlag', '1');
    }
});